package cn.iocoder.yudao.module.system.controller.admin.collate;


import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.system.controller.admin.collate.vo.CollateVo;
import cn.iocoder.yudao.module.system.service.collate.CollateService;
import cn.iocoder.yudao.module.system.service.dept.DeptService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

@Tag(name = "管理后台 - 人工智能校对工具")
@RestController
@RequestMapping("/system/collate")
@Validated
public class CollateController {


    @Resource
    private CollateService collateService;

    @PostMapping("/text")
    @Operation(summary = "获取菜单列表", description = "用于【菜单管理】界面")
    //@PreAuthorize("@ss.hasPermission('system:collate:text')")
    public CommonResult<Map<String,Object>> getProofreadData(@RequestBody CollateVo collateVo) {
        Map<String, Object> resMap = collateService.toDataText(collateVo);
        return success(resMap);
    }
}
